home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / StreetsAlleys.dxr / playing cards_55_f hot.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.3 KB  |  54 lines

  1. property spriteNum, column, baserank
  2. global equal, currentsel, foundation, godlist, action
  3.  
  4. on beginSprite me
  5.   column = determinecolumn()
  6.   baserank = #ace
  7. end
  8.  
  9. on mouseEnter me
  10.   if (the clickOn <> 0) and (the clickOn > 5) then
  11.     if sprite(the clickOn).member <> member("empty", "playing cards") then
  12.       if (action = 1) or (action = 0) then
  13.         if sprite(spriteNum - 118).member = member("empty", "playing cards") then
  14.           if getlist(the clickOn).rank.symbol = baserank then
  15.             equal = 1
  16.             currentsel = spriteNum - 118
  17.             godlist = foundation[column]
  18.           end if
  19.         else
  20.           if (getlist(the clickOn).rankvalue = (foundation[column].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[column].getlastcard().suit) then
  21.             equal = 1
  22.             currentsel = spriteNum - 118
  23.             godlist = foundation[column]
  24.           end if
  25.         end if
  26.       end if
  27.     end if
  28.   end if
  29. end
  30.  
  31. on mouseLeave
  32.   equal = 0
  33.   currentsel = 0
  34.   godlist = VOID
  35. end
  36.  
  37. on determinecolumn me
  38.   if (spriteNum - 118) = 10 then
  39.     return #one
  40.   else
  41.     if (spriteNum - 118) = 11 then
  42.       return #two
  43.     else
  44.       if (spriteNum - 118) = 12 then
  45.         return #three
  46.       else
  47.         if (spriteNum - 118) = 13 then
  48.           return #four
  49.         end if
  50.       end if
  51.     end if
  52.   end if
  53. end
  54.